home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / gnu / dejagnu.lha / dejagnu-1.0.1 / expect / exp_global.h < prev    next >
C/C++ Source or Header  |  1993-03-15  |  2KB  |  61 lines

  1. /* global.h - global definitions
  2.  
  3. Written by: Don Libes, NIST, 2/6/90
  4.  
  5. Design and implementation of this program was paid for by U.S. tax
  6. dollars.  Therefore it is public domain.  However, the author and NIST
  7. would appreciate credit if this program or parts of it are used.
  8. */
  9.  
  10. /* common return codes for Expect functions */
  11. #define EXP_EOF        -11
  12. #define EXP_ABEOF    -1    /* abnormal eof */
  13. #define EXP_TIMEOUT    -2
  14. #define EXP_TCLERROR    -3
  15. /*#define EXP_DATA    -4*/
  16. #define EXP_FULLBUFFER    -5
  17. #define EXP_MATCH    -6
  18. #define EXP_NOMATCH    -7
  19. #define EXP_CANTMATCH    EXP_NOMATCH
  20. #define EXP_CANMATCH    -8
  21. #define EXP_DATA_NEW    -9    /* if select says there is new data */
  22. #define EXP_DATA_OLD    -10    /* if we already read data in another cmd */
  23.  
  24. #define EXP_TIME_INFINITY    -1
  25. #define EXP_SPAWN_ID_BAD    -1
  26.  
  27. #ifndef TRUE
  28. #define FALSE 0
  29. #define TRUE 1
  30. #endif
  31.  
  32. extern char *sys_errlist[];
  33. extern int errno;
  34.  
  35. /* if you get errors from the compiler here, add -DNOSTDLIB to Makefile */
  36. #ifdef NOSTDLIB
  37.     /*** char* malloc(); ***/
  38.     /*** char* realloc(); ***/
  39. #ifndef _TCLINT
  40.     void exit();
  41. #endif
  42. #else
  43. #include <stdlib.h>
  44. #endif
  45.  
  46. /* yes, I have a weak mind */
  47. #define streq(x,y)    (0 == strcmp((x),(y)))
  48.  
  49. #ifdef NO_MEMCPY
  50. #define memcpy(x,y,len) bcopy(y,x,len)
  51. #endif
  52.  
  53. void exp_error();
  54.  
  55. /* yet more TCL return codes */
  56. /* Tcl does not safely provide a way to define the values of these, so */
  57. /* use ridiculously numbers for safety */
  58. #define TCL_CONTINUE_EXPECT    -101    /* continue expect command itself */
  59. #define TCL_RETURN_TCL        -102    /* converted by interact, interpeter */
  60.                     /* from "return -tcl" into TCL_RETURN*/
  61.